<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@taglib uri="http://www.springframework.org/tags/form" prefix="form"%>
<%@taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<jsp:include page="Header.jsp"/>
<title>Apply Leave page</title>
</head>
<body>
<jsp:include page="AdminNav.jsp"/>
	<h1>Apply Leave page</h1>
	<form:form method="POST" commandName="LeaveDetail"
		action="${pageContext.request.contextPath}/LeaveDetail/create.html">
		
		<table>
			<tbody>
				<tr>
					<td>From Date:</td>
					<td><input type="text" class="date form-control" name="startDate" ></td>
					<td><form:errors path="startDate" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>To Date:</td>
					<td><input type="text" class="date form-control" name="endDate" class="form-control"></td>
					<td><form:errors path="endDate" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>LeaveType</td>
					<td><select name="leaveType.leaveTypeId" class="form-control">
							<c:forEach items="${leaveTypelist}" var="V">
								<option value="${V.leaveTypeId}">${V.name}</option>
							</c:forEach>
					</select></td>
					<td><form:errors path="leaveType" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					<td>Reason</td>
					<td><form:input path="reason" class="form-control"/></td>
					<td><form:errors path="reason" cssStyle="color: red;" /></td>
				</tr>
				<tr>
					
					<td></td>
					<td class="pull-right"><input type="submit" value="Create" class="btn btn-primary" /></td>
					<td></td>
				</tr>
			</tbody>
		</table>
	</form:form>
	
	<jsp:include page="footer.jsp"/>
</body>
</html>